package com.qing.myrule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyRule {

	//设置负载均衡策略为随机
	@Bean
	public IRule iRule(){
		return  new MyRandomRule();
	}
}
